package org.todo.service;

import java.util.List;
import org.todo.domain.Category;

/**
 * Service interface that uses the CategoryDao to manage category objects
 * @author Matthias Braunhofer
 */
public interface CategoryService {

    /**
     * Returns all categories that are accessible by a certain user
     * @param username
     * @return
     */
    public List<Category> getCategories(String username);

    /**
     * Delegates the insertion of a new category to the CategoryDao
     * @param category
     */
    public void addCategory(Category category);

    /**
     * Delegates the removal of a certain category to the CategoryDao
     * @param categoryId
     */
    public void deleteCategory(int categoryId);

    /**
     * Returns a category object knowing only its id
     * @param categoryId
     * @return
     */
    public Category getCategory(int categoryId);
}
